home *** CD-ROM | disk | FTP | other *** search
/ Maclife 2 / MACLIFE02-No-82-1995.ISO.7z / MACLIFE02-No-82.ISO / 特集I / FTPd-240 / Documentation / Tutorial by Eric Enwall < prev   
Text File  |  1994-08-04  |  13KB  |  226 lines

  1. [The following is a message sent by Eric Enwall to the gopher-news mailing list, describing how he set up FTPd for gopher access.  He goes thru step by step describing some of the things that confused him, so it might well be useful to other users, so I have, with his permission, included it with the FTPd distribution - Peter]
  2.  
  3. From: "Eric Enwall"  <elenwall@chemdept.chem.uoknor.edu>
  4. To: gopher-news@boombox.micro.umn.edu
  5. Subject: A minimal Mac gopher using FTPd
  6.  
  7. I was asked by a Mac type about setting up a gopher server and I
  8. wrote an explanation of how I had done it. Some folks have recently
  9. asked about gophers on Mac and so I decided to mail this on. If you
  10. are an experienced gopher person, or don't have any truck with Macs
  11. hit kill now. This is an attempt to cover things a a very simple
  12. level so I'm sure most of you won't want to wade through it. Besides,
  13. its pretty long and I've added some justification in places.
  14.  
  15. A Minimal Gopher Server using Peter Lewis's FTPd--There and Back
  16. Again or Why I did it and how.
  17.  
  18. As the 'by default' computer guru in a modest Department of
  19. Chemistry and Biochemistry with a small budget I try to anticipate 
  20. what the boss will ask of me so that if possible it's ready before
  21. the demand. This is usually good for the reputation and often for 
  22. the health of the stomach as well. I expect that we will want to be
  23. providing information about our department over the Internet in the
  24. near future. Gopher provides (IMHO) by far the easiest interface
  25. for the inquirer after information. Because of the UMinn folks'
  26. server code for Macs (and now even more because of Peter's FTPd for
  27. the Mac it is very inexpensive (read cheap) to provide the service
  28. if one has internet connected LocalTalk nets, as we do.
  29.  
  30. We do not anticipate vast amounts of traffic on a server dedicated
  31. to purveying departmental information. Nor will we have tens of
  32. megabytes of information available. Thus a resurrected SE/20 with a
  33. keyboard  shared with the POPMail server next to it will suffice.
  34. It's handy that it resides in my office for monitoring and
  35. certainly I'd recommend that you have the Gopher machine next to
  36. you until you get it up and running on FTP and Gopher. I make too
  37. many small errors in  doing these things to permit walking down the
  38. hall to check the log. We also don't expect rampant vandalism to
  39. constantly attack the Gopher server, but the fact that it is a
  40. small, easily backed up and recovered machine will let us survive
  41. such pea-brains as do find us.
  42.  
  43. It is also of utmost importance (e.g. Kelly Wainwright's letter to
  44. gopher news) that we have mechanisms so that low tech users can
  45. update information in gopher servers. Our secretaries must be able
  46. to use  simple tools (Fetch?) or the usual Mac drag and drop
  47. mechanism to deposit new or altered files. Mail would be better,
  48. but on the Mac I think that's a ways away.
  49.  
  50. Almost all that you need to know is in Peter's documentation, but I
  51. spent really quite a while spinning around from error (all mine) to
  52. error. At one point I decided that the progs were not working right
  53. and composed a long letter to Peter with quotes from the docs to
  54. show where I was having trouble. Some things were solved as I tried
  55. to document things in the letter, and then Farhad's mail
  56. recommending FTPd to the gopher-news group came in. I believe and
  57. trust Farhad. I don't always  agree with him, but if he thinks it
  58. works, it must work. In addition,  all the things I have used of
  59. Peter's (FTPd 1 and Talk) have been slick and pretty clean. It must
  60. work. After another few thousand errors, it does and this is how I
  61. did it. Your mileage may vary, but this recipe could save you some
  62. problems.
  63.  
  64. Running System 7 with file sharing turned on, I had first named the
  65. hard drive with a meaningful name of CGofer. Do this before turning
  66. filesharing on! Then using the File Sharing Monitor in the control
  67. panels, give the machine a sensible name (Appleshare updaters will
  68. find the machine in  the chooser.) Here I turned file sharing on so
  69. that I could let up the various privileges as I went. I think that
  70. it might be better to wait until all folders etc are made before
  71. assigning any since this is where I often made mistakes.
  72.  
  73. In addition to the System folder, I generated a Utilities, FTP, and
  74. GopherTop, folder. I also now copied over the folder of FTPd-201 as
  75.  downloaded. Inside GopherTop I created OUChemGopher (a folder).
  76. You  may notice my careful avoidance of spaces in names. This will
  77. make it easier for some FTPers to work in the system. I also now
  78. copied in files and folders of information from an earlier
  79. incarnation of this gopher  which ran on the UMinn server (which
  80. also works well). These all are in the GopherTop folder. Selecting
  81. these files and folders I made aliases (select them all, make alias
  82. under the file menu) and then dragged all the aliases to
  83. OUChemGopher folder. Inside the OUChemGopher I now changed the
  84. names of the alias files to simple, short, meaningful names. This
  85. makes a more presentable menu to the inquirer.
  86.  
  87. At this time would be a good time to decide if your gopher will
  88. have links to any other gophers. I want to have three: one to the
  89. main OU gopher (which does not now exist, so I will wait on that),
  90. one to the HOME gopher at UMinn, and one to the list of all gophers
  91. also at UMinn. This is best done by using Turbogopher as described
  92. in the FTPd docs. I made two exported bookmarks files with Turbo,
  93. one for home and one for sites and  copied them to CGopher. You can
  94. leave them at the top level, they are  only to be read once. This
  95. can be done later as well, but if you are planning ahead, do it
  96. now.
  97.  
  98. Now, turn on file sharing if it's not on. If you are experienced in
  99. setting privileges on Sys 7 you can skip the next bit. But set the 
  100. privs on thing now. If you are not, as I am not, this is how I do
  101. it.
  102.  
  103. Set a owner name and a GOOD password, it's security time now!
  104.  
  105. If you will have trusted users who are to update files in the FTP
  106. and/or Gopher areas (for me they are the same areas), then you
  107. should use the users and groups control panel to do the job. I
  108. created one group,  gopherites, with all the trusted users,
  109. assigned IDs, passwords etc at this point. That is the group with
  110. change privs on the two folders.
  111.  
  112. Select the hard drive. Under the file menu select sharing... and
  113. set access to see folders, see files, for the everyone entry and
  114. also  to make changes for owner and group (unless you won't ever
  115. let anyone  make changes remotely, then leave that one unchecked.)
  116. Here it is also easiest to check the box 'make all currently
  117. enclosed folders like this  one.' Click the go away box and allow
  118. the changes to be made. Understand that appleshare users can now
  119. see your entire disk. You may want to now set sharing on all
  120. folders except FTP and GopherTop (my names) so that no one except
  121. the owner can see in them.
  122.  
  123. Hurrah! You are now ready to do something with FTPd. FTPd Setup
  124. actually. Peter says you don't have to run this often. I hope he's
  125. right in your case, I've run it at least 20 times now, getting
  126. things correct and just experimenting. You can just start at the
  127. top of the File menu and work down. Privileges...:  This is I think
  128. well explained by Peter. I set for Shared Folders, owner=full
  129. users=upload, guests=read only. All other privs I set to none. This
  130. demon  Peter has made this demon very capable, but you better be
  131. very capable and very careful if you enable any privs higher than
  132. the ones I have set. Except for allowed connect times I left other
  133. stuff at the defaults (since this is a stand alone server.)
  134. Preferences...: Here I only changed three things from the defaults.
  135. I set max users to 5 (on this slow machine I thought it best, but I
  136. have no real reason for doing it.) I changed the text file creater
  137. to be BBedit (which I like a lot more than teachtext.) This is done
  138. via a SFGet type dialog the way most modern apps do it. Just
  139. navigate the file tree until you find the editor program you want
  140. to to be the creator and select it with the OPEN button. Not really
  141. obvious, but hey hacking that routine is a pain. Of course one
  142. needs to check allow  Gopher connections. User Directories...: Here
  143. is the point where things were fuzzy to me, and where I spent most
  144. of my time. You will need at least four users defined: the owner,
  145. anonymous,  Gopher, and GopherRoot. The owner's user directory
  146. should either be /,  /CGofer, or /CGofer/FTP or whatever you have
  147. called the equivalents. (For  Mac types with no Un*x experience,
  148. these are the paths to the folders in Un*x form.) The user
  149. directory for anonymous should be /CGofer/FTP (in my naming
  150. choices.) GopherRoot is /CGofer/GopherTop and Gopher's directory is
  151. /CGofer/GopherTop/OUChemGopher. You need to consider the case of
  152. other users, especially those you want to update the files to be
  153. served by gopher. I  originally planned to enter everyone in this
  154. dialog with their own directory (which would always have been
  155. /CGofer/GopherTop/OUChemGopher. Then the  meaning of Default
  156. directory became clear. Since anonymous FTP users are pointed at
  157. /CGofer/FTP and gopher clients at /CGofer/GopherTop/OUChemGopher,
  158. anyone else (default) not named points at the Default directory
  159. which in my case is now set to /CGofer/GopherTop/OUChemGopher.
  160. Pardon me if this seems obvious to you. Save your changes. Gopher
  161. listing...: Again you get a standard file dialog with which you can
  162. navigate the file  system to get to the folder where Gopher will
  163. display its initial listing to your users. In my case this is the
  164. OUChemGopher folder. I get there,  click on the folder name and
  165. punch the button 'select foldername.'  (For some reason, FTPd Setup
  166. doesn't remember this folder for itself and you will do the
  167. navigation whenever you want to add or change things. POPMail 
  168. users will recognize the dialog.)  This will now show a window
  169. listing the items you have placed in this  folder and some
  170. active/inactive buttons. One great power in gopher is that it can
  171. point a user to information not contained on the host gopher
  172. machine. It does this by having 'links' to other gophers or to
  173. folders or files on other gophers. Here is where you created those
  174. links, either manually or as the docs tell you, by exporting
  175. bookmarks in TurboGopher. We did that way up above. I copied my two
  176. bookmark files into the folder earlier and now  punched Add
  177. Bookmarks. File select the first file (Exported Bookmarks A) was
  178. the name I gave it. A link with the name gopher.tc.umn.edu is added
  179. to the window. Do it again for any more files you have. Now my
  180. first link is to the  home of all gophers, I guess we could call it
  181. the Golden Gopher. Well, maybe that's too much. Anyway,
  182. gopher.tc.umn.edu is not a very good name. Few users would
  183. understand that, but it's what you get this way. If you went back 
  184. via the Mac interface to change its name, you'd find no file in
  185. your folder with that name, but you'd see a !links file. What to
  186. do. Well in the time honored Mac tradition, when you don't know
  187. what to do, click, then double click. On the gopher.tc.umn.edu (or
  188. whatever your link is to.) This brings up a dialog where you can
  189. edit the link. Unless you be a fox, edit only the name. This is the
  190. same dialog you'd get if you had chosen to Add Link. You  can
  191. repeat this for all the bookmarks you imported. Of course Remove
  192. Link is available to get rid of any you don't want. Finally, before
  193. saving, I suggest you Add Index Entry. Now save and quit FTPd
  194. Setup.
  195.  
  196. You have finished setup on a terrific program. For $10 you get FTP
  197. that's  slick, gopher that really works pretty well with easy link
  198. and alias  definition in the pure Mac way, and indexing of your
  199. files. For $10! Run FTPd in the foreground to test it. The log
  200. window starts fresh each  time you start up, but the log file is
  201. appended. On a busy machine you may need to prune this file
  202. occasionally.
  203.  
  204. The only things I'd now suggest are: 1 make an alias to the log
  205. file and drag it to the desktop to make it more  accessible 2 make
  206. sure an alias to the GopherRoot folder is in the FTP folder to make
  207. access by FTP easier. 3 send $10 to Peter!
  208.  
  209. I'm happy to answer e-mail questions about all this. All errors
  210. should be ascribed to my faulty understanding. If you find errors
  211. or things which are unclear, misleading, or clumsy, please mail me
  212. and I'll update this. You  will find the updated copy on
  213. cheminfo.chem.uoknor.edu port 70 as Minimal  Gopher.
  214.  
  215.  
  216.  
  217.  
  218.  
  219. Eric Enwall
  220.                                        snail mail
  221. internet  Eric-Enwall@uoknor.edu       Department of Chemistry and Biochemistry
  222. bitnet    enwall@uokucsvx              University of Oklahoma
  223.                                        Norman, OK  73019-0370
  224.  
  225.  
  226.